﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Windows;
using WpfClient.Windows;
using System.Globalization;

namespace WpfClient
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
        /// <summary>
        /// shows login window and if login passed then shows main window
        /// </summary>
        /// <param name="e"></param>
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);
 
            LoginWindow login = new LoginWindow();

            if (login.ShowDialog() == true)
            {
                StartupUri = new Uri("Windows/MainWindow.xaml", UriKind.Relative);
            }
            else
                this.Shutdown();
        }

    }


}
